import React,{Component} from 'react';
import './mechanismSource.less';
import PropTypes from 'prop-types';
const prefix = 'mobile-mechanism';
class MechanismSource extends Component{
    render(){
        let {imgSrc,listSource} = this.props;
        let listEle = listSource.map((value,index)=>{
           return(
               <div key={index} className={prefix+"-list"}>
                   <h3>{value.title}</h3>
                   <p>{value.content}</p>
               </div>
           )
        });
        return(
            <div className={prefix}>
                <img src={imgSrc} alt=""/>
                {listEle}
            </div>
        )
    }
}
export default MechanismSource;
MechanismSource.propTypes = {
    imgSrc:PropTypes.any.isRequired,
    listSource:PropTypes.array.isRequired
}
